package com.myh.gulimall.ware.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Description: // 类说明，在创建类时要填写
 * @ClassName: MyBatisConfig    // 类名，会自动填充
 * @Author: MYH          // 创建者
 * @Date: 2024/2/15 15:43   // 时间
 * @Version: 1.0     // 版本
 */
@Configuration
@EnableTransactionManagement
public class MyBatisConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setOverflow(true);
        paginationInterceptor.setLimit(1000);
        return paginationInterceptor;
    }
}
